<template>
  <div class="taskVerifySearch">
    <div class="inputText">
      <a-select style="width:100%" :placeholder="$t('status')" v-model="queryParams.actionStatus">
        <a-select-option key="dsh" vlaue="dsh" :title="$t('reviewed')">
          {{ $t('reviewed') }}
        </a-select-option>
        <a-select-option key="all" vlaue="all">
          {{ $t('all') }}
        </a-select-option>
      </a-select>
    </div>
    <div class="inputText">
      <a-input v-model.trim="queryParams.relName" @keyup.enter="handleSearch" :placeholder="$t('name')" allowClear />
    </div>
    <auth-button type="info" :auth="managePerms.audit.view" @click="handleSearch">
      <!-- <i class="iconfont icon-chazhao"></i> -->
      {{ $t('inquiry') }}
    </auth-button>
  </div>
</template>
<script>
import { mapState } from 'vuex'
import { managePerms } from '@/config/permission/index'
import AuthButton from '@/components/AuthButton'
export default {
  components: {
    AuthButton
  },
  computed: {
    ...mapState({
      queryParams: (state) => state.verify.queryParams,
      auditStatus: (state) => state.dict.auditStatusDictCode
    })
  },
  data () {
    return {
      managePerms
    }
  },
  watch: {
  },
  created () {
    if (this.$route.query.relName) {
      this.queryParams.relName = this.$route.query.relName
      this.$emit('clickbtn', { type: 'searchData' })
    }
  },
  methods: {
    handleSearch () {
      this.$emit('clickbtn', { type: 'searchData' })
    },
    handleAdd () {
      this.$emit('clickbtn', { type: 'addProject' })
    }
  }
}
</script>
<style lang="less" scoped>
.taskVerifySearch {
  display: flex;
  .inputText {
    flex: 1 0 0;
     margin-right: 5px;
  }
  .btnWarp {
    text-align: right;
    flex: none;
  }
}
</style>
